// Nav组件的二级路由
const NavRouets = [
  {
    path: '/home',
    alias:'/',
    name: 'Home',
    component: () => import('../views/Home.vue')
  },
  {
    path: '/menu',
    name: 'Menu',
    component: () => import('../views/Menu.vue')
  },
  {
    path: '/bag',
    name: 'Bag',
    props:true,
    component: () => import('../views/Bag.vue')
  },
  {
    path: '/myself',
    name: 'Myself',
    component: () => import('../views/Myself.vue')
  },
]


export const routes = [
  {
    path: '/',
    name: 'Nav',
    component: () => import('../views/Nav.vue'),
    // 二级路由
    children: NavRouets
  },
  {
    path: '/login',
    name: 'Login',
    component: () => import('../views/Login.vue')
  },
  {
    path: '/details/:pid',
    name: 'Details',
    component: () => import('../views/Details.vue')
  },
  {
    path: '/addresslist',
    name: 'AddressList',
    component: () => import('../views/AddressList.vue')
  },
  {
    path: '/address/:aid?',
    name: 'Address',
    component: () => import('../views/Address.vue')
  },
  {
    path: '/order',
    name: 'Order',
    component: () => import('../views/Order.vue')
  },
  {
    path: '/myorder',
    name: 'Myorder',
    component: () => import('../views/Myorder.vue')
  },
  {
    path: '/homepage',
    name: 'Homepage',
    component: () => import('../views/Homepage.vue')
  },
  {
    path: '/favorite',
    name: 'Favorite',
    component: () => import('../views/Favorite.vue')
  },
  {
    path: '/safety',
    name: 'Safety',
    component: () => import('../views/Safety.vue')
  },
]